import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../views/login/index.vue'
import index from '../views/index/index.vue'

Vue.use(VueRouter)

//配置路由
const routes = [{
		path: '/',
		redirect: '/login'
	}, {
		path: '/login',
		name: 'login',
		component: login,
		meta: {
			title: '登录页'
		},
	},
	{
		path: '/home',
		component: index
	},
]
const router = new VueRouter({
	routes,
	mode: 'hash',
	scrollBehavior: () => ({
		y: 0
	}),
})
export default router
